<template>
	<view class="x-doctor-item">
		<view class="" style="display: flex;">
			<view class="avatar-box">
				<u-avatar :src="item.doctorPhoto" size="100rpx"></u-avatar>
			</view>
			<view class="right-content">
				<view class="top">
					<text class="name">{{item.doctorName}}</text>
					<text class="position x-mini-tag" v-if="item.jobTitle">{{item.jobTitle}}</text>
					<view class="years" v-if="item.workYears">从业 <span
							style="color: #386fff;font-size: 38rpx;font-weight: 600;">{{item.workYears}}</span>年</view>
				</view>
				<view class="info">{{item.hospitalName}}｜{{item.departmentName}}</view>
			</view>
		</view>
		<view class="introduce">
			<view class="content-line">
				<span style="color: #3f4249;font-weight: 600;">擅长：</span>
				{{item.goodAt}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: [Object, String],
				default: {}
			}
		},
		data() {
			return {}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	.x-doctor-item {
		margin-bottom: 30rpx;
		padding: 30rpx;
		background: #fff;
		border-radius: 12rpx;
		display: flex;
		flex-direction: column;

		.avatar-box {
			width: 100rpx;
			height: 100rpx;
		}

		.right-content {
			flex: 1;
			min-width: 0;
			padding-left: 25rpx;

			.top {
				margin-bottom: 12rpx;
				display: flex;
				align-items: baseline;
				position: relative;

				.name {
					font-weight: 600;
					margin-right: 10rpx;
					font-size: 36rpx;
					font-family: PingFangSC-Semibold, PingFang SC;
					font-weight: 600;
					color: #333333;
				}

				.position {
					font-size: 20rpx;
					margin-right: 15rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #386fff;
					letter-spacing: 1px;
					height: 40rpx;
					line-height: 40rpx;
					padding: 0 10rpx;
				}

				.years {
					font-size: 28rpx;
					right: 0;
					bottom: 0;
					color: #6e7da1;
					position: absolute;

				}
			}

			.info {
				margin-bottom: 15rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #6e7da1;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
				letter-spacing: 1px;
			}


		}
	}

	.introduce {
		margin-top: 20rpx;
		padding: 15rpx;
		background: #F8F9FD;
		border-radius: 15rpx;
		font-size: 24rpx;
		font-family: PingFangSC-Light, PingFang SC;
		font-weight: 300;
		color: #6F7DA2;
		letter-spacing: 1px;

		.content-line {
			height: 100rpx;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 3;
		}
	}
</style>